package practice;

/**
 * Description:
 *
 * @Author cowen
 * @Create 2023/10/18 17:48
 * @Version 1.0
 */
class ScoreAvage{
    public static void main(String[] args) {
        int[] scores = {1,5,6,8,9,10,6,8};
        int MAX =0;
        int MIN=10;
        int TOTAL=0;
        for (int i = 0; i <scores.length ; i++) {
            TOTAL+=scores[i];
            if(MAX<scores[i]){
                MAX=scores[i];
            }
            if(MIN>scores[i]){
                MIN=scores[i];
            }
        }
        System.out.println("========最终成绩为：========");
        System.out.println((TOTAL-MAX-MIN)/(scores.length-2));
    }
}
